﻿
$(document).ready(function () {
    $.ajax({
        url: "~/../../ServerFile/GetReportTemplates",
        type: "GET",
        dataType: "json",
        success: function (res) {
            var treeData = new Array();
            ReportViewerStaticClass.GetTree(res, treeData);
            $('#myTree').treeview({
                data: treeData, levels: 1,
                onNodeSelected: function (event, data) {
                    // 事件代码...
                    console.log(data.location);
                    ReportViewerStaticClass.OpenFile(data.location);
                }
            });
        }
    });  
}); 